<%-- 
    Document   : getQuanhuyenAjax
    Created on : Jan 5, 2014, 1:54:40 AM
    Author     : THICH HOA DONG TIEN
--%>

<%@page import="bc.entity.Quanhuyen"%>
<%@page import="bc.entity.Thanhpho"%>
<%@page import="businesscard.DAO.ThanhphoDAO"%>
<%@page import="businesscard.DAO.QuanhuyenDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            int city = Integer.parseInt(request.getParameter("thanhpho"));
           

            QuanhuyenDAO qhdao = new QuanhuyenDAO();
            Quanhuyen[] quan = qhdao.selectQuanhuyen(city);
            out.print("Quận/Huyện: <select name='txtQuanhuyen'  >");
            for (int i = 0; i < quan.length; i++) {%>
    <option  value=<%=quan[i].getIdQuanhuyen()%>><%=quan[i].getQuanhuyen()%></option>);
    <%
        }
        out.print(" </select>");
    %>
</body>
</html>
